package com.cxso.example.request.report;

import com.cxso.example.enums.report.CarColorEnum;
import com.cxso.example.enums.report.CarTypeEnum;
import com.cxso.example.enums.report.LicensePlateTypeEnum;
import com.cxso.example.enums.report.VehicleEnergyTypeEnum;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.io.Serializable;


@Getter
@Setter
public class ReportCarRequest implements Serializable {


    @Schema(description = "主体id")
    private String bodyId;

    @Schema(description = "车辆牌照号", example = "鄂A888888")
    @NotBlank(message = "车辆牌照号不能为空")
    private String vehicleNumber;

    @Schema(description = "车牌颜色代码", example = "2")
    @NotNull(message = "车牌颜色代码不能为空")
    private CarColorEnum vehiclePlateColorCode;

    @Schema(description = "车辆类型代码", example = "1")
    private CarTypeEnum vehicleType;

    @Schema(description = "车牌类型")
    private LicensePlateTypeEnum licensePlateTypeCode;

    @Schema(description = "所有人", example = "总质量4.5吨及以下普通货运车辆必填，按照机动车行驶证填写。")
    private String owner;

    @Schema(description = "所有人社会信用码和个人证件号", example = "132456789")
    private String ownerSocialNumber;

    @Schema(description = "使用性质", example = "总质量4.5吨及以下普通货运车辆必填，按照机动车行驶证填写")
    private String useCharacter;

    @Schema(description = "车辆识别代号", example = "总质量4.5吨及以下普通货运车辆必填，按照机动车行驶证填写。")
    private String vin;

    @Schema(description = "发证机关", example = "总质量4.5吨及以下普通货运车辆必填，按照机动车行驶证填写。")
    private String issuingOrganizations;

    @Pattern(regexp = "^\\d{4}(0[1-9]|1[0-2])(0[1-9]|[12]\\d|3[01])$", message = "注册日期格式不正确")
    @Schema(description = "注册日期", example = "总质量4.5吨及以下普通货运车辆必填，按照机动车行驶证填写。YYYYMMDD")
    private String registerDate;

    @Pattern(regexp = "^\\d{4}(0[1-9]|1[0-2])(0[1-9]|[12]\\d|3[01])$", message = "发证日期格式不正确")
    @Schema(description = "发证日期", example = "总质量4.5吨及以下普通货运车辆必填，按照机动车行驶证填写。YYYYMMDD")
    private String issueDate;

    @Pattern(regexp = "^\\d{4}(0[1-9]|1[0-2])$", message = "行驶证有效期至格式不正确")
    @Schema(description = "行驶证有效期至", example = "20200111")
    private String vehicleTo;

    @Schema(description = "车辆能源类型", example = "1")
    private VehicleEnergyTypeEnum vehicleEnergyType;

    @Schema(description = "车长")
    private String vehicleLength;

    @Schema(description = "核定载质量", example = "必填，参考机动车行驶证填写，默认单位：吨，保留两位小数，如整数的话，以.00填充。小数点不计入总长。")
    private String vehicleTonnage;

    @Schema(description = "吨位", example = "必填，车辆总质量，默认单位：吨，保留两位小数，如整数的话，以.00填充。小数点不计入总长。")
    private String grossMass;

    @Schema(description = "道路运输证号", example = "必填，总质量4.5吨及以下普通货运车辆的，可填“车籍地6位行政区域代码+000000”。")
    private String roadTransportCertificateNumber;

    @Schema(description = "挂车牌照号", example = "1")
    private String trailerVehiclePlateNumber;

    @Schema(description = "备注", example = "56415656")
    private String remark;

    @Schema(description = "行驶证档案编号", example = "可用0进行填充，长度为12-18位字符")
    private String vehicleLicenseNumber;

    @Pattern(regexp = "^\\d{4}(0[1-9]|1[0-2])(0[1-9]|[12]\\d|3[01])$", message = "道路运输证有效期自格式不正确")
    @Schema(description = "道路运输证有效期自", example = "道路运输证有效期自，按照道路运输证填写。yyyyMMdd")
    private String roadTransportSocialCreditFrom;

    @Pattern(regexp = "^\\d{4}(0[1-9]|1[0-2])(0[1-9]|[12]\\d|3[01])$", message = "道路运输证有效期至格式不正确")
    @Schema(description = "道路运输证有效期至", example = "道路运输证有效期至，按照道路运输证填写。yyyyMMdd")
    private String roadTransportSocialCreditTo;

    @Schema(description = "行驶证正面图片")
    private String vehicleLicenseFrontImg;

    @Schema(description = "行驶证反面图片")
    private String vehicleLicenseBackImg;

    @Schema(description = "道路运输证照片")
    private String roadTransportLicenseImg;

    @Schema(description = "挂车正副本照片")
    private String trailerLicenseImg;

    @Schema(description = "人车合照")
    private String groupPhotoImg;

    @Schema(description = "道路运输经营许可证")
    private String roadTransportBusinessLicense;

}
